import createAxios from '/@/utils/axios'

export const apiUrl = '/api/ai.user';

// 保存用户信息
export function save_info(params: any) {
    return createAxios({
        url: apiUrl + '/save_info',
        method: 'post',
        data: params,
    })
}

// 卡密充值
export function recharge_kami(params: any) {
    return createAxios({
        url: apiUrl + '/recharge_kami',
        method: 'post',
        data: params,
    })
}

// 重置AppToken
export function reset_app_token() {
    return createAxios({
        url: apiUrl + '/reset_app_token',
        method: 'post',
    })
}

// promotion
export function promotion() {
    return createAxios({
        url: apiUrl + '/promotion',
        method: 'get',
    })
}

// 获取会员套餐
export function get_vip(params: any) {
    return createAxios({
        url: apiUrl + '/get_vip',
        method: 'get',
        params: params,
    })
}

// 购买会员套餐
export function buy_vip(params: any) {
    return createAxios({
        url: apiUrl + '/buy_vip',
        method: 'post',
        data: params,
    })
}

// 获取会员记录
export function get_vip_record(params: any) {
    return createAxios({
        url: apiUrl + '/get_vip_record',
        method: 'get',
        params: params,
    })
}

// 会员消耗记录
export function get_vip_log(params: any) {
    return createAxios({
        url: apiUrl + '/get_vip_log',
        method: 'get',
        params: params,
    })
}
